Skip to content

Conversation

@alsdddk
Copy link
Collaborator

@alsdddk alsdddk commented Jan 5, 2026

📎 Issue 번호

closed #193

📄 작업 내용 요약

1. nextTriggerAt 저장
사용자가 반복 일정을 생성하고 알림 on 상태로 생성할 경우,
scheduled_notification(예정된 알림 목록)에 첫 번째 알림만 ACTIVE 상태로 생성되고
해당 알림이 실제로 전송된 후에(COMPLETED) 다음 반복주기의 알림을 새로 생성되도록 만들었습니다.

2. event/task 삭제 시 리마인드 알림 cancel 처리
사용자가 리마인드 알림 ON 상태로 생성한 event 또는 task를 삭제하는 경우,
scheduled_notification에 이미 생성되어 있던 해당 알림을
CANCELED 상태로 변경하도록 처리했습니다.

💬 Review Requirements (선택)

(현재 nextTriggerAt을 처리하는 로직이 중복됩니다! 이는 추후 리팩토링할 예정입니다)

@alsdddk alsdddk self-assigned this Jan 20, 2026
@alsdddk alsdddk added 👾server👾 Backend 👍feature👍 기능 개발 labels Jan 20, 2026
@alsdddk alsdddk requested a review from k-dhyun January 20, 2026 11:25
@alsdddk alsdddk merged commit 2d0a818 into develop-server Jan 20, 2026
Copy link
Collaborator

@k-dhyun k-dhyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전체적으로 코드 중복이 줄어들어서 더 깔끔해진 느낌이에요! 저도 중복있는거 더 있나 확인해보겠습니다!

//반복일정의 경우 다음 알림에 저장
Event target = eventRepository.findById(noti.getTargetId())
.orElseThrow(() -> new RestApiException(ErrorCode.EVENT_NOT_FOUND));

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

task 알림 처러시에 event 관련 에러처리가 나와서 조건처리해야될거 같아요. 추후에 task도 반복처리하게될 경우 반복할일도 다음에 알림에 저장하게끔 미리 만들어둬도 괜찮을거 같아요.


private final ScheduledNotificationRepository scheduledNotiRepository;
private final EventRepository eventRepository;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createScheduledNotification(Event event)랑 createScheduledNotification(Task task) 두개가 비슷한 코드라 코드중복 제거하고 하나로 합치면 좀 더 좋을거 같아요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants